/*
 * ﻿Copyright (C) 2013-2014 NewMain Softech
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */
package com.newmainsoftech.eatestutil.container;

import java.io.File;

import org.codehaus.cargo.container.ContainerType;
import org.codehaus.cargo.container.configuration.ConfigurationType;

/**
 * Contracts for setting up EE container.<br /> 
 * 
 * @author Arata Y.
 */
public interface ContainerConfig {
	String getContainerInstallerUrlStr();
	/**
	 * Set URL of container installer what this uses to install container. <br />
	 * 
	 * @param containerInstallerUrlStr
	 */
	void setContainerInstallerUrlStr( String containerInstallerUrlStr);
	
	String getContainerId(); 
	/**
	 * Set container ID.<br />
	 * 
	 * @param containerId
	 */
	void setContainerId( String containerId);
	
	ContainerType getTypeOfContainer(); 
	/**
	 * Set type of container. <br />
	 * 
	 * @param typeOfContainer
	 */
	void setTypeOfContainer( ContainerType typeOfContainer);
	
	ConfigurationType getConfigurationType();
	/**
	 * Set configuration type of JEE container. <br />
	 * 
	 * @param configurationType
	 */
	void setConfigurationType( ConfigurationType configurationType);
	
	String getTestDBName();
	/**
	 * Set name of test data-base. <br />
	 * 
	 * @param testDBName
	 */
	void setTestDBName( String testDBName);
	
	String getDbTestUserName();
	/**
	 * Set user name being used to manage datasource. <br />
	 * 
	 * @param dbTestUserName
	 */
	void setDbTestUserName( String dbTestUserName);
	
	String getDbTestUserPassword();
	/**
	 * Set user password being used to manage datasource. <br />
	 * 
	 * @param dbTestUserPassword
	 */
	void setDbTestUserPassword( String dbTestUserPassword);
	
	String getDomainName();
	/**
	 * Set domain name. <br />
	 * 
	 * @param domainName
	 */
	void setDomainName( String domainName);
	
	String getConfigHomeDirPath();
	/**
	 * Set directory of container configuration files what are generated by cargo. <br />
	 * 
	 * @param configHomeDirPath
	 */
	void setConfigHomeDirPath( String configHomeDirPath);
	
	String getExtractDirPath();
	/**
	 * Set directory for container to be extracted by installer. <br />
	 * 
	 * @param extractDirPath
	 */
	void setExtractDirPath( String extractDirPath);
	
	File getCargoLogFile();
	void setCargoLogFile( File cargoLogFile);
	
	long getContainerStartTimeout();
	/**
	 * Set time out duration for starting JEE container. <br />
	 * 
	 * @param containerStartTimeout
	 */
	void setContainerStartTimeout( long containerStartTimeout);
	
	/**
	 * Install Glassfish and return <code>{@link InstalledLocalContainerWrapper}</code> instance 
	 * configured for the installed Glassfish.<br />
	 * 
	 * @return <code>{@link InstalledLocalContainerWrapper}</code> instance configured for installed 
	 * Glassfish.
	 * @throws Exception
	 */
	InstalledLocalContainerWrapper prepInstalledLocalContainer() throws Exception;
}
